//
//  NYFocusView.m
//  NiuWaJiaoYu
//
//  Created by MinLison on 2018/1/7.
//  Copyright © 2018年 niuwaketang. All rights reserved.
//

#import "NYFocusView.h"

@implementation NYFocusView

- (void)setupView {
    [super setupView];
    self.backgroundColor = UIColorHex(0xf5f5f5);
}
- (void)setContentView:(UIView *)contentView {
    if (!_contentView) {
            [_contentView removeFromSuperview];
    }
    _contentView = contentView;
    
    [self addSubview:contentView];
    [contentView mas_makeConstraints:^(MASConstraintMaker *make) {
        
            if (@available(iOS 11.0,*)) {
                    make.top.equalTo(self.mas_safeAreaLayoutGuideTop);
                    make.left.equalTo(self.mas_safeAreaLayoutGuideLeft);
                    make.right.equalTo(self.mas_safeAreaLayoutGuideRight);
                    make.bottom.equalTo(self.mas_safeAreaLayoutGuideBottom);
            } else {
                    make.top.equalTo(self.controller.mas_topLayoutGuideBottom);
                    make.left.right.equalTo(self);
                    make.bottom.equalTo(self.controller.mas_bottomLayoutGuideTop);
            }
    }];
}

@end
